#ifndef RECTANGLE_FITTING_H_
#define RECTANGLE_FITTING_H_

#include "opencv2/opencv.hpp"
#include <vector>
#include <Eigen/Core>

using namespace cv;

class RectangleFitting {
 public:
  RectangleFitting(/* args */);
  ~RectangleFitting();

  void Fit(std::vector<cv::Point> &points, RotatedRect &rect);
  void Fit(const std::vector<Eigen::Vector2f> &in, RotatedRect &rect,
           cv::Mat &mats);

  void transform(const std::vector<Eigen::Vector2f> &in,
                 std::vector<cv::Point> &out);
  void transform(const std::vector<Eigen::Vector2f> &in,
                 std::vector<cv::Point2f> &out);
};

#endif